//
// Created by Max on 2025/5/28.
//

#ifndef ALL_MIC_DETECT_MIC_CONFIG_H
#define ALL_MIC_DETECT_MIC_CONFIG_H
#include "hr_common.h"

class MicConfig {

public:
    MicConfig();
    ~MicConfig();
    int Init(int channelNum, int sampleRate);
    int DeInit();
    int readMic(void *data, unsigned int frame_count);
    uint32_t pcmFrames2Bytes(uint32_t frames);
    uint32_t pcmGetBufferSize();
private:
    struct pcm *mPcm;

};


#endif //ALL_MIC_DETECT_MIC_CONFIG_H
